public class Test {
    public static void main(String[] args) {
        Studen studen = new Studen();
        studen.name = "张三";
        studen.age = 18;
        System.out.println(studen.toString());

        System.out.println("=====================");

        Studen studen1 = new Studen("王鹏",29);
        System.out.println(studen1.toString());
    }
}
class Studen {
    public String name;
    public int age;

    public void sleep() {
        System.out.println("睡觉");
    }
    public void classroom() {
        System.out.println("23中本信管1班");
    }

    public Studen(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public Studen() {

    }

    @Override
    public String toString() {
        return "Studen{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
